#ifndef AUDIOPLAYER_H
#define AUDIOPLAYER_H
#include <QObject>
#include <QUrl>
class QUrl;
class QMediaPlayer;
class AudioPlayer : public QObject          //控制游戏音乐
{
public:
    explicit AudioPlayer(QObject *parent= 0);

    void startBGM();
    void playSound(int id);
    QMediaPlayer *backgroundMusic;
    void setMuted(bool checked);
    void setBgmValue(int value);
    int getBgmValue();
    QUrl musicUrl[20];
    QMediaPlayer *player;
private:

};

#endif // AUDIOPLAYER_H
